package com.he.DesignPatterns.command;

/**
 * @description:
 * @Author: HCL
 * @Date: 2024/9/27 14:32
 */
public class Client {
    public static void main(String[] args) {
        //请求
        Stock stock = new Stock();

        //具体实现
        BuyStock buyStock = new BuyStock(stock);
        SellStock sellStock = new SellStock(stock);

        //命令
        Broker broker = new Broker();
        broker.takeOrder(buyStock);
        broker.takeOrder(sellStock);

        broker.placeOrders();
    }
}
